package com.wbc.smartHome.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Component
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "社区活动标签模型类")
public class CommunityActivitiesLabel implements Serializable {
    @ApiModelProperty(value = "社区活动标签id")
    private Integer id;
    @ApiModelProperty(value = "类别名字")
    private String name;//类别名字
    @ApiModelProperty(value = "操作人")
    private String adminName;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//接收前端提交数据的日期格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//后端向前端转json时的日期格式
    private Date operTime;//创建时间
    @ApiModelProperty(value = "关键字")
    private String title;
    @ApiModelProperty(value = "当前页码显示")
    private Integer pageNo;//当前页码显示
    @ApiModelProperty(value = "每页显示的数量")
    private Integer pageSize;//每页显示的数量


    public CommunityActivitiesLabel(int id) {
        this.id = id;
    }
}
